<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <button onclick="emailMark()">访问后台</button>
</body>
<script src="/static/jquery-3.6.0.min.js"></script>
<script>
    function emailMark() {
        $(function () {
            let mailbox_address = "2981686588@qq.com";
            $.ajax({
                xhrFields: {
                    withCredentials: true
                },
                url: "http://127.0.0.1:5000/mark_email",
                type: "POST",
                data: {
                    "mailbox_address": mailbox_address
                },
                dataType: "json",
                // async: false,
                success: function (data){
                    alert(data);
                },
                error: function (err){
                    console.log(err);
                    alert(err.statusText + "访问错误！");
                }
            });
            alert("访问后台结束");
        });
    }
</script>
</html>